/*
 * SerializableRoute.java
 * 
 * Copyright 2008 David D. Emory
 * 
 * This file is part of Five Points. See <http://www.fpdev.org> for
 * additional information regarding the project.
 * 
 * Five Points is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Five Points is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Five Points.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.fpdev.core.transit;

import java.io.Serializable;
import java.util.Iterator;
import java.util.List;

public class SerializableRoute implements Serializable {

  private String id_;
  private boolean showID_;
  private String name_;
  private String provID_;
  private int scenID_;
  private List<SerializableSubRoute> subs_;

  public SerializableRoute(String id, boolean showID, String name, String provID, int scenID, List<SerializableSubRoute> subs) {
    super();
    id_ = id;
    showID_ = showID;
    name_ = name;
    provID_ = provID;
    scenID_ = scenID;
    subs_ = subs;
  }

  public String getID() {
    return id_;
  }

  public boolean getShowID() {
    return showID_;
  }

  public String getName() {
    return name_;
  }

  public String getProviderID() {
    return provID_;
  }

  public int getScenarioID() {
    return scenID_;
  }

  public Iterator getSubRoutes() {
    return subs_.iterator();
  }

  public void test() {
    System.out.println(id_ + " " + name_);
    Iterator<SerializableSubRoute> subs = subs_.iterator();
    while (subs.hasNext()) {
      System.out.println(" - " + subs.next().getID());
    }
  }
}
